package com.youmu.sichuansfc.domain;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "youmu_notify_read_history", schema = "youmu", catalog = "")
public class YoumuNotifyReadHistory {
    private Long id;
    private Timestamp addTime;
    private Timestamp readTime;
    private Long fundUserId;
    private Long notifyId;
    private Boolean isDelete;

    public void setId(long id) {
        this.id = id;
    }

    public void setReadTime(Timestamp readTime) {
        this.readTime = readTime;
    }

    public void setFundUserId(long fundUserId) {
        this.fundUserId = fundUserId;
    }

    public void setNotifyId(long notifyId) {
        this.notifyId = notifyId;
    }

    @Id
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "add_time")
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Basic
    @Column(name = "read_time")
    public Timestamp getReadTime() {
        return readTime;
    }


    @Basic
    @Column(name = "fund_user_id")
    public Long getFundUserId() {
        return fundUserId;
    }

    public void setFundUserId(Long fundUserId) {
        this.fundUserId = fundUserId;
    }

    @Basic
    @Column(name = "notify_id")
    public Long getNotifyId() {
        return notifyId;
    }

    public void setNotifyId(Long notifyId) {
        this.notifyId = notifyId;
    }



    @Basic
    @Column(name = "is_delete")
    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean delete) {
        isDelete = delete;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YoumuNotifyReadHistory that = (YoumuNotifyReadHistory) o;
        return id == that.id &&
                fundUserId == that.fundUserId &&
                notifyId == that.notifyId &&
                isDelete == that.isDelete &&
                Objects.equals(addTime, that.addTime) &&
                Objects.equals(readTime, that.readTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, addTime, readTime, fundUserId, notifyId, isDelete);
    }
}
